home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / asmmacros / am_02 / rename.i < prev    next >
Text File  |  1995-03-19  |  2KB  |  63 lines

  1.      NOLIST
  2. Rename      MACRO              ; 19 Dec 88
  3. *------------------------------; Start of Rename macro.
  4.      NOLIST
  5.      IFC '\1','I'              ; If <PointerToOldNameString> is specified,
  6.      LIST
  7.                                ; Put <PointerToOldNameString> in D1.
  8.      MOVE.L #\2,D1
  9.      NOLIST
  10.      IFEQ ReEntrant-1
  11.      LIST
  12.      ADD.L A5,D1
  13.      NOLIST
  14.      ENDC
  15.      ENDC
  16.      IFC '\1','D'              ; If <OldNameString> is specified, then
  17.      LIST
  18.                                ; Make D1 point to <OldNameString>.
  19.      MOVE.L #\2.str,D1
  20.      NOLIST
  21.      IFND \2.str               ; Unless it was previously defined,
  22.      LIST
  23.      SECTION DataSection,DATA  ; The ASCII <OldNameString> string goes here.
  24. \2.str:
  25.      DC.B '\2',0
  26.      CNOP 0,2
  27.      SECTION CodeSection,CODE
  28.      NOLIST
  29.      ENDC
  30.      ENDC
  31.      IFC '\3','I'              ; If <PointerToNewNameString> is specified,
  32.      LIST
  33.                                ; Put <PointerToNewNameString> in D1.
  34.      MOVE.L #\4,D1
  35.      NOLIST
  36.      IFEQ ReEntrant-1
  37.      LIST
  38.      ADD.L A5,D1
  39.      NOLIST
  40.      ENDC
  41.      ENDC
  42.      IFC '\3','D'              ; If <NewNameString> is specified, then
  43.      LIST
  44.                                ; Make D1 point to <NewNameString>.
  45.      MOVE.L #\4.str,D1
  46.      NOLIST
  47.      IFND \4.str               ; Unless it was previously defined,
  48.      LIST
  49.      SECTION DataSection,DATA  ; The ASCII <NewNameString> string goes here.
  50. \4.str:
  51.      DC.B '\4',0
  52.      CNOP 0,2
  53.      SECTION CodeSection,CODE
  54.      NOLIST
  55.      ENDC
  56.      ENDC
  57.      LIST
  58.      CallLib Rename,dos        ; Call Rename.
  59.      TST.L D0                  ; Make the zero flag indicate failure.
  60. *------------------------------; End of Rename macro.
  61.      ENDM
  62.      LIST
  63.